/**
 * Created by Administrator on 2017/6/2 0002.
 */
define([], function () {
    var tpl = {};
    tpl.init = function () {
        var html = '';
        html += info();
        return html;
    }
    tpl.init2 = function () {
        var html = '';
        html += infoList();
        return html;
    }
    var info = function () {
        return '<script id="userInfo" type="text/html">' +
                '   <p><i class="fa fa-user" aria-hidden="true"></i><span>{{userName}}</span></p>'+
                '   <p>性别：   <span class="val">{{sex}}</span></p>'+
                '   <p>年龄：<span class="val">{{age}}</span></p>'+
                '   <p>孕周：<span class="val">{{pregnancyWeek}}</span></p>'+
                '   <p>队列：<span class="val">{{followQueueName}}</span></p>'+
                '   <p>手机号：<span class="val">{{phone}}</span></p>'+
                '</script>';
    }
    //搜索框模板
    var infoList = function(){
       return  '<script id="userInfoDetails" type="text/html">' +
                '{{each data as value}}'+
                    '<li userId="{{value.patientId}}" phone="{{value.phoneNum}}"><span class="userName">{{value.patientName}}</span>&nbsp;&nbsp;'+
                        '{{if value.gender=="F"}}' +
                        '   <span class="sex">女&nbsp;&nbsp;</span>'+
                        '{{else}}'+
                        '   <span class="sex">男&nbsp;&nbsp;</span>'+
                        '{{/if}}'+
                        '<span class="age">&nbsp;&nbsp;{{value.age}}</span>'+
                        '<span class="pregnancyWeek">&nbsp;&nbsp;{{value.pregnancyWeek}}</span>'+
                        '<span class="followQueueName">&nbsp;&nbsp;{{value.followQueueName}}</span>'+
                    '</li>'+
                '{{/each}}'+
                '</script>';
    }
    return tpl;
});
